package edu.uts.reekie.designer.execution.figures;

import org.eclipse.draw2d.PolygonDecoration;
import org.eclipse.draw2d.PolylineConnection;
import org.eclipse.draw2d.RoutingAnimator;

import edu.uts.reekie.designer.figures.FigureFactory;
import edu.uts.reekie.designer.model.AbstractConnector;

public class ConcreteFigureFactory implements FigureFactory {

	public PolylineConnection createNewConnector(AbstractConnector c) {
		PolylineConnection conn = new PolylineConnection();
		conn.addRoutingListener(RoutingAnimator.getDefault());
		PolygonDecoration arrow = new PolygonDecoration();
		arrow.setTemplate(PolygonDecoration.INVERTED_TRIANGLE_TIP);
		conn.setSourceDecoration(arrow);
		
		return conn;
	}

}
